<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <caption>员工列表</caption>
    <tr>
        <th>名字</th><th>工资</th><th>工作</th>
    </tr>
    <!--v-for遍历数组，arr是遍历的数组变量，
    emp代表遍历出来的每一个员工对象-->
   <tr v-for="emp in arr">
       <td>{{emp.name}}</td>
       <td>{{emp.salary}}</td>
       <td>{{emp.job}}</td>
   </tr>
</table>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
   let v=new Vue({
       el:"table",
       data: {
           arr: [{name: "刘备", salary: 5000, job: "打野"},
               {name: "关羽", salary: 6000, job: "战士"},
               {name: "张飞", salary: 7000, job: "坦克"}]
       }
   })
</script>
</body>
</html>